package thread;

public class Test02 {
    public static void main(String[] args) {
        ATM atm1 = new ATM();
        ATM atm2 = new ATM();
        new Thread(){
            @Override
            public void run() {
                try {
                    atm1.get("张三",500);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }.start();
        new Thread(){
            @Override
            public void run() {
                try {
                    atm2.get("李四",200);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }.start();
    }
}
